//package minijava;
//import java.util.List;
public class Program : Stmt.Compound {
    public List<Decl> ld;
    public Program(List<Decl> ld, List<Stmt> ls) : base(ls) {
        this.ld = ld;
    }
    public String ToString() {
        String ret = "";
        foreach (Decl d in ld) ret += d;
        foreach (Stmt s in ls) ret += s;
        return ret;
    }
    public override void accept(MinijavaVisitor v) {
        if (!v.preVisit(this)) return;
        foreach (Decl d in ld) d.accept(v);
        foreach (Stmt s in ls) s.accept(v);
        v.postVisit(this);
    }
}
